'''
Created on 2010-3-3

@author: Administrator
'''
from jolly.datastructures.OrderedList import OrderedList

class SortedList(OrderedList):
    '''
    Base class from which all sorted list classes are derived.
    '''


    def __init__(self):
        '''
        (SortedList) -> None
        Constructor.
        '''
        super(SortedList, self).__init__()
        
    @staticmethod
    def test(list):
        "SortedList test program."
        print SortedList.test.__doc__
        list.insert(4)
        list.insert(3)
        list.insert(2)
        list.insert(1)
        list.insert(2)
        print list
        obj = list.find(2)
        list.withdraw(obj)
        print list
        for i in list:
            print i
        